package org.xtext.ic.parser.antlr.internal; 

import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import org.xtext.ic.services.TestGrammarAccess;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings("all")
public class InternalTestParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package-prefix'", "'layer'", "'{'", "'}'", "'typedef'", "'mapsto'", "'.'", "'entity'", "'extends'", "'*'"
    };
    public static final int RULE_ID=4;
    public static final int RULE_ANY_OTHER=10;
    public static final int T__20=20;
    public static final int EOF=-1;
    public static final int RULE_SL_COMMENT=8;
    public static final int RULE_ML_COMMENT=7;
    public static final int T__19=19;
    public static final int RULE_STRING=6;
    public static final int T__16=16;
    public static final int T__15=15;
    public static final int T__18=18;
    public static final int T__17=17;
    public static final int T__12=12;
    public static final int T__11=11;
    public static final int T__14=14;
    public static final int T__13=13;
    public static final int RULE_INT=5;
    public static final int RULE_WS=9;

    // delegates
    // delegators


        public InternalTestParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public InternalTestParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        

    public String[] getTokenNames() { return InternalTestParser.tokenNames; }
    public String getGrammarFileName() { return "../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g"; }



     	private TestGrammarAccess grammarAccess;
     	
        public InternalTestParser(TokenStream input, TestGrammarAccess grammarAccess) {
            this(input);
            this.grammarAccess = grammarAccess;
            registerRules(grammarAccess.getGrammar());
        }
        
        @Override
        protected String getFirstRuleName() {
        	return "Model";	
       	}
       	
       	@Override
       	protected TestGrammarAccess getGrammarAccess() {
       		return grammarAccess;
       	}



    // $ANTLR start "entryRuleModel"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:67:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
    public final EObject entryRuleModel() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleModel = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:68:2: (iv_ruleModel= ruleModel EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:69:2: iv_ruleModel= ruleModel EOF
            {
             newCompositeNode(grammarAccess.getModelRule()); 
            pushFollow(FOLLOW_ruleModel_in_entryRuleModel75);
            iv_ruleModel=ruleModel();

            state._fsp--;

             current =iv_ruleModel; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleModel85); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleModel"


    // $ANTLR start "ruleModel"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:76:1: ruleModel returns [EObject current=null] : ( ( (lv_package_0_0= rulePackagePrefix ) )? ( (lv_types_1_0= ruleType ) )* ) ;
    public final EObject ruleModel() throws RecognitionException {
        EObject current = null;

        EObject lv_package_0_0 = null;

        EObject lv_types_1_0 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:79:28: ( ( ( (lv_package_0_0= rulePackagePrefix ) )? ( (lv_types_1_0= ruleType ) )* ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:80:1: ( ( (lv_package_0_0= rulePackagePrefix ) )? ( (lv_types_1_0= ruleType ) )* )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:80:1: ( ( (lv_package_0_0= rulePackagePrefix ) )? ( (lv_types_1_0= ruleType ) )* )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:80:2: ( (lv_package_0_0= rulePackagePrefix ) )? ( (lv_types_1_0= ruleType ) )*
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:80:2: ( (lv_package_0_0= rulePackagePrefix ) )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==11) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:81:1: (lv_package_0_0= rulePackagePrefix )
                    {
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:81:1: (lv_package_0_0= rulePackagePrefix )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:82:3: lv_package_0_0= rulePackagePrefix
                    {
                     
                    	        newCompositeNode(grammarAccess.getModelAccess().getPackagePackagePrefixParserRuleCall_0_0()); 
                    	    
                    pushFollow(FOLLOW_rulePackagePrefix_in_ruleModel131);
                    lv_package_0_0=rulePackagePrefix();

                    state._fsp--;


                    	        if (current==null) {
                    	            current = createModelElementForParent(grammarAccess.getModelRule());
                    	        }
                           		set(
                           			current, 
                           			"package",
                            		lv_package_0_0, 
                            		"PackagePrefix");
                    	        afterParserOrEnumRuleCall();
                    	    

                    }


                    }
                    break;

            }

            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:98:3: ( (lv_types_1_0= ruleType ) )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==12||LA2_0==15||LA2_0==18) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:99:1: (lv_types_1_0= ruleType )
            	    {
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:99:1: (lv_types_1_0= ruleType )
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:100:3: lv_types_1_0= ruleType
            	    {
            	     
            	    	        newCompositeNode(grammarAccess.getModelAccess().getTypesTypeParserRuleCall_1_0()); 
            	    	    
            	    pushFollow(FOLLOW_ruleType_in_ruleModel153);
            	    lv_types_1_0=ruleType();

            	    state._fsp--;


            	    	        if (current==null) {
            	    	            current = createModelElementForParent(grammarAccess.getModelRule());
            	    	        }
            	           		add(
            	           			current, 
            	           			"types",
            	            		lv_types_1_0, 
            	            		"Type");
            	    	        afterParserOrEnumRuleCall();
            	    	    

            	    }


            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleModel"


    // $ANTLR start "entryRulePackagePrefix"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:124:1: entryRulePackagePrefix returns [EObject current=null] : iv_rulePackagePrefix= rulePackagePrefix EOF ;
    public final EObject entryRulePackagePrefix() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePackagePrefix = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:125:2: (iv_rulePackagePrefix= rulePackagePrefix EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:126:2: iv_rulePackagePrefix= rulePackagePrefix EOF
            {
             newCompositeNode(grammarAccess.getPackagePrefixRule()); 
            pushFollow(FOLLOW_rulePackagePrefix_in_entryRulePackagePrefix190);
            iv_rulePackagePrefix=rulePackagePrefix();

            state._fsp--;

             current =iv_rulePackagePrefix; 
            match(input,EOF,FOLLOW_EOF_in_entryRulePackagePrefix200); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRulePackagePrefix"


    // $ANTLR start "rulePackagePrefix"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:133:1: rulePackagePrefix returns [EObject current=null] : (otherlv_0= 'package-prefix' ( (lv_name_1_0= ruleJAVAID ) ) ) ;
    public final EObject rulePackagePrefix() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        AntlrDatatypeRuleToken lv_name_1_0 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:136:28: ( (otherlv_0= 'package-prefix' ( (lv_name_1_0= ruleJAVAID ) ) ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:137:1: (otherlv_0= 'package-prefix' ( (lv_name_1_0= ruleJAVAID ) ) )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:137:1: (otherlv_0= 'package-prefix' ( (lv_name_1_0= ruleJAVAID ) ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:137:3: otherlv_0= 'package-prefix' ( (lv_name_1_0= ruleJAVAID ) )
            {
            otherlv_0=(Token)match(input,11,FOLLOW_11_in_rulePackagePrefix237); 

                	newLeafNode(otherlv_0, grammarAccess.getPackagePrefixAccess().getPackagePrefixKeyword_0());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:141:1: ( (lv_name_1_0= ruleJAVAID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:142:1: (lv_name_1_0= ruleJAVAID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:142:1: (lv_name_1_0= ruleJAVAID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:143:3: lv_name_1_0= ruleJAVAID
            {
             
            	        newCompositeNode(grammarAccess.getPackagePrefixAccess().getNameJAVAIDParserRuleCall_1_0()); 
            	    
            pushFollow(FOLLOW_ruleJAVAID_in_rulePackagePrefix258);
            lv_name_1_0=ruleJAVAID();

            state._fsp--;


            	        if (current==null) {
            	            current = createModelElementForParent(grammarAccess.getPackagePrefixRule());
            	        }
                   		set(
                   			current, 
                   			"name",
                    		lv_name_1_0, 
                    		"JAVAID");
            	        afterParserOrEnumRuleCall();
            	    

            }


            }


            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "rulePackagePrefix"


    // $ANTLR start "entryRuleType"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:167:1: entryRuleType returns [EObject current=null] : iv_ruleType= ruleType EOF ;
    public final EObject entryRuleType() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleType = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:168:2: (iv_ruleType= ruleType EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:169:2: iv_ruleType= ruleType EOF
            {
             newCompositeNode(grammarAccess.getTypeRule()); 
            pushFollow(FOLLOW_ruleType_in_entryRuleType294);
            iv_ruleType=ruleType();

            state._fsp--;

             current =iv_ruleType; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleType304); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleType"


    // $ANTLR start "ruleType"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:176:1: ruleType returns [EObject current=null] : (this_Layer_0= ruleLayer | this_TypeDef_1= ruleTypeDef | this_Entity_2= ruleEntity ) ;
    public final EObject ruleType() throws RecognitionException {
        EObject current = null;

        EObject this_Layer_0 = null;

        EObject this_TypeDef_1 = null;

        EObject this_Entity_2 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:179:28: ( (this_Layer_0= ruleLayer | this_TypeDef_1= ruleTypeDef | this_Entity_2= ruleEntity ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:180:1: (this_Layer_0= ruleLayer | this_TypeDef_1= ruleTypeDef | this_Entity_2= ruleEntity )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:180:1: (this_Layer_0= ruleLayer | this_TypeDef_1= ruleTypeDef | this_Entity_2= ruleEntity )
            int alt3=3;
            switch ( input.LA(1) ) {
            case 12:
                {
                alt3=1;
                }
                break;
            case 15:
                {
                alt3=2;
                }
                break;
            case 18:
                {
                alt3=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 3, 0, input);

                throw nvae;
            }

            switch (alt3) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:181:5: this_Layer_0= ruleLayer
                    {
                     
                            newCompositeNode(grammarAccess.getTypeAccess().getLayerParserRuleCall_0()); 
                        
                    pushFollow(FOLLOW_ruleLayer_in_ruleType351);
                    this_Layer_0=ruleLayer();

                    state._fsp--;

                     
                            current = this_Layer_0; 
                            afterParserOrEnumRuleCall();
                        

                    }
                    break;
                case 2 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:191:5: this_TypeDef_1= ruleTypeDef
                    {
                     
                            newCompositeNode(grammarAccess.getTypeAccess().getTypeDefParserRuleCall_1()); 
                        
                    pushFollow(FOLLOW_ruleTypeDef_in_ruleType378);
                    this_TypeDef_1=ruleTypeDef();

                    state._fsp--;

                     
                            current = this_TypeDef_1; 
                            afterParserOrEnumRuleCall();
                        

                    }
                    break;
                case 3 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:201:5: this_Entity_2= ruleEntity
                    {
                     
                            newCompositeNode(grammarAccess.getTypeAccess().getEntityParserRuleCall_2()); 
                        
                    pushFollow(FOLLOW_ruleEntity_in_ruleType405);
                    this_Entity_2=ruleEntity();

                    state._fsp--;

                     
                            current = this_Entity_2; 
                            afterParserOrEnumRuleCall();
                        

                    }
                    break;

            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleType"


    // $ANTLR start "entryRuleLayerType"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:217:1: entryRuleLayerType returns [EObject current=null] : iv_ruleLayerType= ruleLayerType EOF ;
    public final EObject entryRuleLayerType() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleLayerType = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:218:2: (iv_ruleLayerType= ruleLayerType EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:219:2: iv_ruleLayerType= ruleLayerType EOF
            {
             newCompositeNode(grammarAccess.getLayerTypeRule()); 
            pushFollow(FOLLOW_ruleLayerType_in_entryRuleLayerType440);
            iv_ruleLayerType=ruleLayerType();

            state._fsp--;

             current =iv_ruleLayerType; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleLayerType450); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleLayerType"


    // $ANTLR start "ruleLayerType"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:226:1: ruleLayerType returns [EObject current=null] : (this_Layer_0= ruleLayer | this_Entity_1= ruleEntity ) ;
    public final EObject ruleLayerType() throws RecognitionException {
        EObject current = null;

        EObject this_Layer_0 = null;

        EObject this_Entity_1 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:229:28: ( (this_Layer_0= ruleLayer | this_Entity_1= ruleEntity ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:230:1: (this_Layer_0= ruleLayer | this_Entity_1= ruleEntity )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:230:1: (this_Layer_0= ruleLayer | this_Entity_1= ruleEntity )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==12) ) {
                alt4=1;
            }
            else if ( (LA4_0==18) ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;
            }
            switch (alt4) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:231:5: this_Layer_0= ruleLayer
                    {
                     
                            newCompositeNode(grammarAccess.getLayerTypeAccess().getLayerParserRuleCall_0()); 
                        
                    pushFollow(FOLLOW_ruleLayer_in_ruleLayerType497);
                    this_Layer_0=ruleLayer();

                    state._fsp--;

                     
                            current = this_Layer_0; 
                            afterParserOrEnumRuleCall();
                        

                    }
                    break;
                case 2 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:241:5: this_Entity_1= ruleEntity
                    {
                     
                            newCompositeNode(grammarAccess.getLayerTypeAccess().getEntityParserRuleCall_1()); 
                        
                    pushFollow(FOLLOW_ruleEntity_in_ruleLayerType524);
                    this_Entity_1=ruleEntity();

                    state._fsp--;

                     
                            current = this_Entity_1; 
                            afterParserOrEnumRuleCall();
                        

                    }
                    break;

            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleLayerType"


    // $ANTLR start "entryRuleLayer"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:257:1: entryRuleLayer returns [EObject current=null] : iv_ruleLayer= ruleLayer EOF ;
    public final EObject entryRuleLayer() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleLayer = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:258:2: (iv_ruleLayer= ruleLayer EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:259:2: iv_ruleLayer= ruleLayer EOF
            {
             newCompositeNode(grammarAccess.getLayerRule()); 
            pushFollow(FOLLOW_ruleLayer_in_entryRuleLayer559);
            iv_ruleLayer=ruleLayer();

            state._fsp--;

             current =iv_ruleLayer; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleLayer569); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleLayer"


    // $ANTLR start "ruleLayer"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:266:1: ruleLayer returns [EObject current=null] : (otherlv_0= 'layer' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_types_3_0= ruleLayerType ) )* otherlv_4= '}' ) ;
    public final EObject ruleLayer() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token lv_name_1_0=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        EObject lv_types_3_0 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:269:28: ( (otherlv_0= 'layer' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_types_3_0= ruleLayerType ) )* otherlv_4= '}' ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:270:1: (otherlv_0= 'layer' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_types_3_0= ruleLayerType ) )* otherlv_4= '}' )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:270:1: (otherlv_0= 'layer' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_types_3_0= ruleLayerType ) )* otherlv_4= '}' )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:270:3: otherlv_0= 'layer' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_types_3_0= ruleLayerType ) )* otherlv_4= '}'
            {
            otherlv_0=(Token)match(input,12,FOLLOW_12_in_ruleLayer606); 

                	newLeafNode(otherlv_0, grammarAccess.getLayerAccess().getLayerKeyword_0());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:274:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:275:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:275:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:276:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleLayer623); 

            			newLeafNode(lv_name_1_0, grammarAccess.getLayerAccess().getNameIDTerminalRuleCall_1_0()); 
            		

            	        if (current==null) {
            	            current = createModelElement(grammarAccess.getLayerRule());
            	        }
                   		setWithLastConsumed(
                   			current, 
                   			"name",
                    		lv_name_1_0, 
                    		"ID");
            	    

            }


            }

            otherlv_2=(Token)match(input,13,FOLLOW_13_in_ruleLayer640); 

                	newLeafNode(otherlv_2, grammarAccess.getLayerAccess().getLeftCurlyBracketKeyword_2());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:296:1: ( (lv_types_3_0= ruleLayerType ) )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==12||LA5_0==18) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:297:1: (lv_types_3_0= ruleLayerType )
            	    {
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:297:1: (lv_types_3_0= ruleLayerType )
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:298:3: lv_types_3_0= ruleLayerType
            	    {
            	     
            	    	        newCompositeNode(grammarAccess.getLayerAccess().getTypesLayerTypeParserRuleCall_3_0()); 
            	    	    
            	    pushFollow(FOLLOW_ruleLayerType_in_ruleLayer661);
            	    lv_types_3_0=ruleLayerType();

            	    state._fsp--;


            	    	        if (current==null) {
            	    	            current = createModelElementForParent(grammarAccess.getLayerRule());
            	    	        }
            	           		add(
            	           			current, 
            	           			"types",
            	            		lv_types_3_0, 
            	            		"LayerType");
            	    	        afterParserOrEnumRuleCall();
            	    	    

            	    }


            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);

            otherlv_4=(Token)match(input,14,FOLLOW_14_in_ruleLayer674); 

                	newLeafNode(otherlv_4, grammarAccess.getLayerAccess().getRightCurlyBracketKeyword_4());
                

            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleLayer"


    // $ANTLR start "entryRuleTypeDef"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:326:1: entryRuleTypeDef returns [EObject current=null] : iv_ruleTypeDef= ruleTypeDef EOF ;
    public final EObject entryRuleTypeDef() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleTypeDef = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:327:2: (iv_ruleTypeDef= ruleTypeDef EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:328:2: iv_ruleTypeDef= ruleTypeDef EOF
            {
             newCompositeNode(grammarAccess.getTypeDefRule()); 
            pushFollow(FOLLOW_ruleTypeDef_in_entryRuleTypeDef710);
            iv_ruleTypeDef=ruleTypeDef();

            state._fsp--;

             current =iv_ruleTypeDef; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleTypeDef720); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleTypeDef"


    // $ANTLR start "ruleTypeDef"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:335:1: ruleTypeDef returns [EObject current=null] : (otherlv_0= 'typedef' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )? ) ;
    public final EObject ruleTypeDef() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token lv_name_1_0=null;
        Token otherlv_2=null;
        AntlrDatatypeRuleToken lv_mappedType_3_0 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:338:28: ( (otherlv_0= 'typedef' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )? ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:339:1: (otherlv_0= 'typedef' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )? )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:339:1: (otherlv_0= 'typedef' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )? )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:339:3: otherlv_0= 'typedef' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )?
            {
            otherlv_0=(Token)match(input,15,FOLLOW_15_in_ruleTypeDef757); 

                	newLeafNode(otherlv_0, grammarAccess.getTypeDefAccess().getTypedefKeyword_0());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:343:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:344:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:344:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:345:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleTypeDef774); 

            			newLeafNode(lv_name_1_0, grammarAccess.getTypeDefAccess().getNameIDTerminalRuleCall_1_0()); 
            		

            	        if (current==null) {
            	            current = createModelElement(grammarAccess.getTypeDefRule());
            	        }
                   		setWithLastConsumed(
                   			current, 
                   			"name",
                    		lv_name_1_0, 
                    		"ID");
            	    

            }


            }

            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:361:2: (otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) ) )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==16) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:361:4: otherlv_2= 'mapsto' ( (lv_mappedType_3_0= ruleJAVAID ) )
                    {
                    otherlv_2=(Token)match(input,16,FOLLOW_16_in_ruleTypeDef792); 

                        	newLeafNode(otherlv_2, grammarAccess.getTypeDefAccess().getMapstoKeyword_2_0());
                        
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:365:1: ( (lv_mappedType_3_0= ruleJAVAID ) )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:366:1: (lv_mappedType_3_0= ruleJAVAID )
                    {
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:366:1: (lv_mappedType_3_0= ruleJAVAID )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:367:3: lv_mappedType_3_0= ruleJAVAID
                    {
                     
                    	        newCompositeNode(grammarAccess.getTypeDefAccess().getMappedTypeJAVAIDParserRuleCall_2_1_0()); 
                    	    
                    pushFollow(FOLLOW_ruleJAVAID_in_ruleTypeDef813);
                    lv_mappedType_3_0=ruleJAVAID();

                    state._fsp--;


                    	        if (current==null) {
                    	            current = createModelElementForParent(grammarAccess.getTypeDefRule());
                    	        }
                           		set(
                           			current, 
                           			"mappedType",
                            		lv_mappedType_3_0, 
                            		"JAVAID");
                    	        afterParserOrEnumRuleCall();
                    	    

                    }


                    }


                    }
                    break;

            }


            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleTypeDef"


    // $ANTLR start "entryRuleJAVAID"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:391:1: entryRuleJAVAID returns [String current=null] : iv_ruleJAVAID= ruleJAVAID EOF ;
    public final String entryRuleJAVAID() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleJAVAID = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:392:2: (iv_ruleJAVAID= ruleJAVAID EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:393:2: iv_ruleJAVAID= ruleJAVAID EOF
            {
             newCompositeNode(grammarAccess.getJAVAIDRule()); 
            pushFollow(FOLLOW_ruleJAVAID_in_entryRuleJAVAID852);
            iv_ruleJAVAID=ruleJAVAID();

            state._fsp--;

             current =iv_ruleJAVAID.getText(); 
            match(input,EOF,FOLLOW_EOF_in_entryRuleJAVAID863); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleJAVAID"


    // $ANTLR start "ruleJAVAID"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:400:1: ruleJAVAID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ;
    public final AntlrDatatypeRuleToken ruleJAVAID() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token this_ID_0=null;
        Token kw=null;
        Token this_ID_2=null;

         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:403:28: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:404:1: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:404:1: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:404:6: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )*
            {
            this_ID_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleJAVAID903); 

            		current.merge(this_ID_0);
                
             
                newLeafNode(this_ID_0, grammarAccess.getJAVAIDAccess().getIDTerminalRuleCall_0()); 
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:411:1: (kw= '.' this_ID_2= RULE_ID )*
            loop7:
            do {
                int alt7=2;
                int LA7_0 = input.LA(1);

                if ( (LA7_0==17) ) {
                    alt7=1;
                }


                switch (alt7) {
            	case 1 :
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:412:2: kw= '.' this_ID_2= RULE_ID
            	    {
            	    kw=(Token)match(input,17,FOLLOW_17_in_ruleJAVAID922); 

            	            current.merge(kw);
            	            newLeafNode(kw, grammarAccess.getJAVAIDAccess().getFullStopKeyword_1_0()); 
            	        
            	    this_ID_2=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleJAVAID937); 

            	    		current.merge(this_ID_2);
            	        
            	     
            	        newLeafNode(this_ID_2, grammarAccess.getJAVAIDAccess().getIDTerminalRuleCall_1_1()); 
            	        

            	    }
            	    break;

            	default :
            	    break loop7;
                }
            } while (true);


            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleJAVAID"


    // $ANTLR start "entryRuleEntity"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:432:1: entryRuleEntity returns [EObject current=null] : iv_ruleEntity= ruleEntity EOF ;
    public final EObject entryRuleEntity() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleEntity = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:433:2: (iv_ruleEntity= ruleEntity EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:434:2: iv_ruleEntity= ruleEntity EOF
            {
             newCompositeNode(grammarAccess.getEntityRule()); 
            pushFollow(FOLLOW_ruleEntity_in_entryRuleEntity984);
            iv_ruleEntity=ruleEntity();

            state._fsp--;

             current =iv_ruleEntity; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleEntity994); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleEntity"


    // $ANTLR start "ruleEntity"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:441:1: ruleEntity returns [EObject current=null] : (otherlv_0= 'entity' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? otherlv_4= '{' ( (lv_attributes_5_0= ruleAttribute ) )* otherlv_6= '}' ) ;
    public final EObject ruleEntity() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token lv_name_1_0=null;
        Token otherlv_2=null;
        Token otherlv_3=null;
        Token otherlv_4=null;
        Token otherlv_6=null;
        EObject lv_attributes_5_0 = null;


         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:444:28: ( (otherlv_0= 'entity' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? otherlv_4= '{' ( (lv_attributes_5_0= ruleAttribute ) )* otherlv_6= '}' ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:445:1: (otherlv_0= 'entity' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? otherlv_4= '{' ( (lv_attributes_5_0= ruleAttribute ) )* otherlv_6= '}' )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:445:1: (otherlv_0= 'entity' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? otherlv_4= '{' ( (lv_attributes_5_0= ruleAttribute ) )* otherlv_6= '}' )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:445:3: otherlv_0= 'entity' ( (lv_name_1_0= RULE_ID ) ) (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? otherlv_4= '{' ( (lv_attributes_5_0= ruleAttribute ) )* otherlv_6= '}'
            {
            otherlv_0=(Token)match(input,18,FOLLOW_18_in_ruleEntity1031); 

                	newLeafNode(otherlv_0, grammarAccess.getEntityAccess().getEntityKeyword_0());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:449:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:450:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:450:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:451:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEntity1048); 

            			newLeafNode(lv_name_1_0, grammarAccess.getEntityAccess().getNameIDTerminalRuleCall_1_0()); 
            		

            	        if (current==null) {
            	            current = createModelElement(grammarAccess.getEntityRule());
            	        }
                   		setWithLastConsumed(
                   			current, 
                   			"name",
                    		lv_name_1_0, 
                    		"ID");
            	    

            }


            }

            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:467:2: (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )?
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( (LA8_0==19) ) {
                alt8=1;
            }
            switch (alt8) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:467:4: otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) )
                    {
                    otherlv_2=(Token)match(input,19,FOLLOW_19_in_ruleEntity1066); 

                        	newLeafNode(otherlv_2, grammarAccess.getEntityAccess().getExtendsKeyword_2_0());
                        
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:471:1: ( (otherlv_3= RULE_ID ) )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:472:1: (otherlv_3= RULE_ID )
                    {
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:472:1: (otherlv_3= RULE_ID )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:473:3: otherlv_3= RULE_ID
                    {

                    			if (current==null) {
                    	            current = createModelElement(grammarAccess.getEntityRule());
                    	        }
                            
                    otherlv_3=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleEntity1086); 

                    		newLeafNode(otherlv_3, grammarAccess.getEntityAccess().getSuperEntityEntityCrossReference_2_1_0()); 
                    	

                    }


                    }


                    }
                    break;

            }

            otherlv_4=(Token)match(input,13,FOLLOW_13_in_ruleEntity1100); 

                	newLeafNode(otherlv_4, grammarAccess.getEntityAccess().getLeftCurlyBracketKeyword_3());
                
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:488:1: ( (lv_attributes_5_0= ruleAttribute ) )*
            loop9:
            do {
                int alt9=2;
                int LA9_0 = input.LA(1);

                if ( (LA9_0==RULE_ID) ) {
                    alt9=1;
                }


                switch (alt9) {
            	case 1 :
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:489:1: (lv_attributes_5_0= ruleAttribute )
            	    {
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:489:1: (lv_attributes_5_0= ruleAttribute )
            	    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:490:3: lv_attributes_5_0= ruleAttribute
            	    {
            	     
            	    	        newCompositeNode(grammarAccess.getEntityAccess().getAttributesAttributeParserRuleCall_4_0()); 
            	    	    
            	    pushFollow(FOLLOW_ruleAttribute_in_ruleEntity1121);
            	    lv_attributes_5_0=ruleAttribute();

            	    state._fsp--;


            	    	        if (current==null) {
            	    	            current = createModelElementForParent(grammarAccess.getEntityRule());
            	    	        }
            	           		add(
            	           			current, 
            	           			"attributes",
            	            		lv_attributes_5_0, 
            	            		"Attribute");
            	    	        afterParserOrEnumRuleCall();
            	    	    

            	    }


            	    }
            	    break;

            	default :
            	    break loop9;
                }
            } while (true);

            otherlv_6=(Token)match(input,14,FOLLOW_14_in_ruleEntity1134); 

                	newLeafNode(otherlv_6, grammarAccess.getEntityAccess().getRightCurlyBracketKeyword_5());
                

            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleEntity"


    // $ANTLR start "entryRuleAttribute"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:518:1: entryRuleAttribute returns [EObject current=null] : iv_ruleAttribute= ruleAttribute EOF ;
    public final EObject entryRuleAttribute() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAttribute = null;


        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:519:2: (iv_ruleAttribute= ruleAttribute EOF )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:520:2: iv_ruleAttribute= ruleAttribute EOF
            {
             newCompositeNode(grammarAccess.getAttributeRule()); 
            pushFollow(FOLLOW_ruleAttribute_in_entryRuleAttribute1170);
            iv_ruleAttribute=ruleAttribute();

            state._fsp--;

             current =iv_ruleAttribute; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAttribute1180); 

            }

        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleAttribute"


    // $ANTLR start "ruleAttribute"
    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:527:1: ruleAttribute returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) ( (lv_many_1_0= '*' ) )? ( (lv_name_2_0= RULE_ID ) ) ) ;
    public final EObject ruleAttribute() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token lv_many_1_0=null;
        Token lv_name_2_0=null;

         enterRule(); 
            
        try {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:530:28: ( ( ( (otherlv_0= RULE_ID ) ) ( (lv_many_1_0= '*' ) )? ( (lv_name_2_0= RULE_ID ) ) ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:531:1: ( ( (otherlv_0= RULE_ID ) ) ( (lv_many_1_0= '*' ) )? ( (lv_name_2_0= RULE_ID ) ) )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:531:1: ( ( (otherlv_0= RULE_ID ) ) ( (lv_many_1_0= '*' ) )? ( (lv_name_2_0= RULE_ID ) ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:531:2: ( (otherlv_0= RULE_ID ) ) ( (lv_many_1_0= '*' ) )? ( (lv_name_2_0= RULE_ID ) )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:531:2: ( (otherlv_0= RULE_ID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:532:1: (otherlv_0= RULE_ID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:532:1: (otherlv_0= RULE_ID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:533:3: otherlv_0= RULE_ID
            {

            			if (current==null) {
            	            current = createModelElement(grammarAccess.getAttributeRule());
            	        }
                    
            otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAttribute1225); 

            		newLeafNode(otherlv_0, grammarAccess.getAttributeAccess().getTypeTypeCrossReference_0_0()); 
            	

            }


            }

            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:544:2: ( (lv_many_1_0= '*' ) )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==20) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:545:1: (lv_many_1_0= '*' )
                    {
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:545:1: (lv_many_1_0= '*' )
                    // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:546:3: lv_many_1_0= '*'
                    {
                    lv_many_1_0=(Token)match(input,20,FOLLOW_20_in_ruleAttribute1243); 

                            newLeafNode(lv_many_1_0, grammarAccess.getAttributeAccess().getManyAsteriskKeyword_1_0());
                        

                    	        if (current==null) {
                    	            current = createModelElement(grammarAccess.getAttributeRule());
                    	        }
                           		setWithLastConsumed(current, "many", true, "*");
                    	    

                    }


                    }
                    break;

            }

            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:559:3: ( (lv_name_2_0= RULE_ID ) )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:560:1: (lv_name_2_0= RULE_ID )
            {
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:560:1: (lv_name_2_0= RULE_ID )
            // ../org.xtext.ic.test/src-gen/org/xtext/ic/parser/antlr/internal/InternalTest.g:561:3: lv_name_2_0= RULE_ID
            {
            lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAttribute1274); 

            			newLeafNode(lv_name_2_0, grammarAccess.getAttributeAccess().getNameIDTerminalRuleCall_2_0()); 
            		

            	        if (current==null) {
            	            current = createModelElement(grammarAccess.getAttributeRule());
            	        }
                   		setWithLastConsumed(
                   			current, 
                   			"name",
                    		lv_name_2_0, 
                    		"ID");
            	    

            }


            }


            }


            }

             leaveRule(); 
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleAttribute"

    // Delegated rules


 

    public static final BitSet FOLLOW_ruleModel_in_entryRuleModel75 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleModel85 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rulePackagePrefix_in_ruleModel131 = new BitSet(new long[]{0x0000000000049002L});
    public static final BitSet FOLLOW_ruleType_in_ruleModel153 = new BitSet(new long[]{0x0000000000049002L});
    public static final BitSet FOLLOW_rulePackagePrefix_in_entryRulePackagePrefix190 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRulePackagePrefix200 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_11_in_rulePackagePrefix237 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ruleJAVAID_in_rulePackagePrefix258 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleType_in_entryRuleType294 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleType304 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLayer_in_ruleType351 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleTypeDef_in_ruleType378 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleEntity_in_ruleType405 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLayerType_in_entryRuleLayerType440 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleLayerType450 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLayer_in_ruleLayerType497 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleEntity_in_ruleLayerType524 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleLayer_in_entryRuleLayer559 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleLayer569 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_12_in_ruleLayer606 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleLayer623 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleLayer640 = new BitSet(new long[]{0x000000000004D000L});
    public static final BitSet FOLLOW_ruleLayerType_in_ruleLayer661 = new BitSet(new long[]{0x000000000004D000L});
    public static final BitSet FOLLOW_14_in_ruleLayer674 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleTypeDef_in_entryRuleTypeDef710 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleTypeDef720 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_15_in_ruleTypeDef757 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleTypeDef774 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_16_in_ruleTypeDef792 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ruleJAVAID_in_ruleTypeDef813 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleJAVAID_in_entryRuleJAVAID852 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleJAVAID863 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleJAVAID903 = new BitSet(new long[]{0x0000000000020002L});
    public static final BitSet FOLLOW_17_in_ruleJAVAID922 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleJAVAID937 = new BitSet(new long[]{0x0000000000020002L});
    public static final BitSet FOLLOW_ruleEntity_in_entryRuleEntity984 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleEntity994 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_18_in_ruleEntity1031 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleEntity1048 = new BitSet(new long[]{0x0000000000082000L});
    public static final BitSet FOLLOW_19_in_ruleEntity1066 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleEntity1086 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleEntity1100 = new BitSet(new long[]{0x0000000000004010L});
    public static final BitSet FOLLOW_ruleAttribute_in_ruleEntity1121 = new BitSet(new long[]{0x0000000000004010L});
    public static final BitSet FOLLOW_14_in_ruleEntity1134 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAttribute_in_entryRuleAttribute1170 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAttribute1180 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleAttribute1225 = new BitSet(new long[]{0x0000000000100010L});
    public static final BitSet FOLLOW_20_in_ruleAttribute1243 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleAttribute1274 = new BitSet(new long[]{0x0000000000000002L});

}